Split SpatialData objects via deconcatenate()#1124
Open
LucaMarconato wants to merge 6 commits into
Open
Conversation
for more information, see https://pre-commit.ci
- Move deconcatenate() from deconcatenate.py into concatenate.py and delete the old module - Rename full_sdata -> sdata, by -> split_by (now a column name, not a value); split_by defaults to region_key inferred from table attrs - Remove region_key, instance_key, target_coordinate_system and sdatas_table_names parameters; infer region_key/instance_key from attrs via get_table_keys(); table_name auto-detected when sdata has exactly one table - Replace match_sdata_to_table loop with direct join_spatialelement_table calls; use groupby to partition obs in one pass (O(n_obs)) instead of per-value boolean filtering (O(n_values * n_obs)) - Always return list[SpatialData] (no more single/list duality) - Export deconcatenate from spatialdata.__init__ - Rewrite test to use 3 self-contained shape elements and cover the split_by non-default column path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
for more information, see https://pre-commit.ci
Member
Author
|
@gboscagli I started from your code and reworked a bit. I changed a bit the arguments and tried to infer more parameters by default. Could you try it out/comment please? 😊 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1124 +/- ##
==========================================
- Coverage 92.04% 92.04% -0.01%
==========================================
Files 51 51
Lines 7785 7807 +22
==========================================
+ Hits 7166 7186 +20
- Misses 619 621 +2
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up on the work from @gboscagli started here #1089.